﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Babelfish.MetaData;
using Babelfish.Node;

namespace Babelfish
{
    /// <summary>
    /// 
    /// </summary>
    public interface INode
    {
        /// <summary>
        /// Gets the name of this node.
        /// </summary>
        /// <value>The name.</value>
        string Name { get; }
        /// <summary>
        /// Gets the value of this node.
        /// </summary>
        /// <value>The value.</value>
        string Text { get; }

        /// <summary>
        /// Gets the metadata of this node, like html or xml comments
        /// </summary>
        /// <value></value>
        MetaDataCollection MetaData { get;  }

        /// <summary>
        /// Gets a value indicating whether this node has a value.
        /// </summary>
        /// <value><c>true</c> if this node has a value; otherwise, <c>false</c>.</value>
        bool HasValue { get; }
        /// <summary>
        /// Gets the parent node of this node.
        /// </summary>
        /// <value>The parent node.</value>
        INode Parent { get;  }
        /// <summary>
        /// Gets the siblings of this node.
        /// </summary>
        /// <value>The sibling nodes.</value>
        NodeCollection Siblings { get; }

        /// <summary>
        /// Gets the child nodes of this node.
        /// </summary>
        /// <value>The child nodes.</value>
        NodeCollection ChildNodes { get; }

        /// <summary>
        /// Gets the attributes of this node.
        /// </summary>
        /// <value>The attributes.</value>
        AttributeCollection Attributes { get; }

        /// <summary>
        /// Gets or sets the parent collection.
        /// </summary>
        /// <value>The parent collection.</value>
        NodeCollection ParentCollection { get; set; }
    }
}
